package com.ltmonitor.jt808.protocol;

public class PostitionAdditional_Oil implements IPositionAdditionalItem {

	public final int getAdditionalId() {
		return 0x02;
	}

	public final byte getAdditionalLength() {
		return 0x02;
	}

	/**
	 * 油量，WORD，1/10L，对应车上油量表读数
	 */
	private short oil;

	public final short getOil() {
		return oil;
	}

	public final void setOil(short value) {
		oil = value;
	}

	public final byte[] WriteToBytes() {
		return BitConverter.GetBytes(getOil());
	}

	public final void ReadFromBytes(byte[] bytes) {
		setOil((short) BitConverter.ToUInt16(bytes, 0));
	}
}